package com.qf.web.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qf.web.entity.Banner;
import com.qf.web.entity.Navigation;

import java.util.List;


/**
 * @author KING
 * @ClassName: com.qf.web.mapper.NavigationMapper
 * @Description: 该类的功能描述
 * @date: 2021/11/10 20:55
 */


public interface NavigationMapper extends BaseMapper<Navigation> {
    default List<Navigation> getNavigations() {
        QueryWrapper<Navigation> qw = new QueryWrapper<>();
        qw.lambda().select(Navigation::getName, Navigation::getLinkUrl)
                .eq(Navigation::getStatus, 1);
        return selectList(qw);
    }
}
